$breakpoint-table: 1232px;

.wrapper {
  max-width: 1920px;

  .loading {
    margin-top: 40px;
    width: 100%;

    :global {
      .euiLoadingContent__singleLine {
        height: 36px;

        &:first-child {
          height: 42px;
          margin-bottom: 18px;
        }
      }

      .euiLoadingContent__singleLine:last-child:not(:only-child) {
        width: 100%;
      }
    }
  }
}

.tableWrapper {
  @include eui.scrollBar;

  overflow: auto;
  position: relative;
  max-height: 100%;
}

.table.tableNodes {
  :global {
    .euiTableHeaderCell {
      min-width: 144px;
      background-color: var(--euiColorEmptyShade);

      @media screen and (max-width: $breakpoint-table) {
        min-width: 112px;
      }

      .euiTableCellContent {
        min-height: 78px;
        padding: 12px 12px 18px 24px;
        justify-content: flex-start;
        align-items: flex-end;

        @media screen and (max-width: $breakpoint-table) {
          padding: 12px 6px 18px 12px;
        }

        &.euiTableCellContent--alignRight {
          padding-left: 12px;
          padding-right: 24px;
          justify-content: flex-start;
          align-items: flex-end;
          flex-direction: row-reverse;

          @media screen and (max-width: $breakpoint-table) {
            padding-left: 6px;
            padding-right: 12px;
          }

          .euiTableSortIcon {
            margin-right: 4px;
            margin-left: 0;
          }
        }

        &.euiTableCellContent--alignCenter {
          justify-content: center;

          .euiTableSortIcon {
            margin-right: 0;
            margin-left: 4px;
          }
        }

        .euiTableCellContent__text {
          font:
            normal normal normal 12px/18px Graphik,
            sans-serif;
        }
      }

      .euiTableHeaderButton {
        border-bottom: 1px solid var(--euiColorLightShade);
        outline: 1px solid var(--euiColorEmptyShade);
      }
    }

    .euiTableCellContent {
      position: relative;
      padding: 12px 12px 12px 24px;
      font: normal normal 500 16px/18px Inconsolata;

      @media screen and (max-width: $breakpoint-table) {
        padding: 12px 6px 12px 12px;
      }

      &.euiTableCellContent--alignRight {
        padding-left: 12px;
        padding-right: 24px;

        @media screen and (max-width: $breakpoint-table) {
          padding-left: 6px;
          padding-right: 12px;
        }
      }
    }

    .euiTableSortIcon {
      width: 14px;
      height: 14px;
      margin-bottom: 2px;
      fill: var(--htmlColor) !important;
    }

    .euiTableHeaderButton.euiTableHeaderButton-isSorted {
      span,
      div {
        color: var(--htmlColor) !important;
      }
    }

    .euiTableHeaderButton:focus .euiTableCellContent__text {
      text-decoration: none;
    }
  }

  :global(.euiTableCellContent) .maxValue {
    color: var(--euiTooltipTitleTextColor);
    font-weight: bold;
  }

  :global(.euiTableHeaderButton.euiTableHeaderButton-isSorted) .headerIcon {
    fill: var(--htmlColor) !important;
  }

  .valueUnit {
    font:
      normal normal normal 12px/18px Graphik,
      sans-serif !important;
    margin-left: 4px;
    color: var(--euiColorMediumShade) !important;
  }

  .nodeName {
    margin-right: 12px;
    display: block;
    min-width: 24px;
    font:
      normal normal 500 13px/18px Graphik,
      sans-serif !important;
  }

  .headerCell {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-end;

    .headerIcon {
      fill: var(--textColorShade);
      width: 24px;
      height: 20px;
      margin-bottom: 4px;
    }
  }

  .hostPort {
    display: inline-flex;
    font:
      normal normal normal 13px/18px Graphik,
      sans-serif !important;
  }

  .nodeColor {
    position: absolute;
    left: 0;
    top: 1px;
    bottom: 1px;
    width: 3px;
  }
}
